package com.cn.vodao;

import com.cn.BaseDao.BaseDao;
import com.cn.vo.CommtypeImg;
import com.cn.vodaoIntface.CommtypeImgDaoIntface;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

public class CommtypeImgDao extends BaseDao implements CommtypeImgDaoIntface {
    @Override
    public List<CommtypeImg> queryAll() throws ClassNotFoundException, SQLException, InstantiationException, IllegalAccessException {
        String sql = "select commodityType.commodity_type_id,commodityType.iconpath,commodityType.commodity_type_name,commodityType.father_id,commodityType.imgid,imges.img_url from commodityType  LEFT JOIN imges ON commodityType.imgid=imges.img_id";
        return this.executeQuery(sql, CommtypeImg.class);
    }

    @Override
    public Object tableToClass(ResultSet rs) throws Exception {
        return null;
    }
}
